home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
System Booster
/
System Booster.iso
/
Texteditors
/
PolyEd
/
Macros
/
jb_stripcr.ped
< prev
next >
Wrap
Text File
|
1996-09-26
|
2KB
|
55 lines
/*
** $VER: jb_stripcr.rexx 1.0 (23.2.95) written by Johan Billing
**
** This macro removes all CR characters (Carriage return, ASCII 13) from a
** text. This can be useful if you load a text that has been edited on a
** MS-DOS machine
*/
OPTIONS RESULTS
OPTIONS FAILAT 11 /* ignore warnings */
SIGNAL ON SYNTAX /* ensure clean exit */
SIGNAL ON FAILURE
SIGNAL ON BREAK_C /* no label->syntax->exit */
if (LEFT(ADDRESS(), 6) ~= "POLYED") then do
if SHOW("Ports", "POLYED.1") then
address 'POLYED.1'
else do
say "PolyEd is not running!"
exit
end
end
'LOCKGUI'
/*----- begin of custom code area --------------------------------------*/
/*
** This is rediculously simple, but unfortunately it can take a while
** with big texts...
*/
'GETATTR APPLICATION STEM APP.'
'FINDCHANGE FIND "' || '0d'x || '" CHANGE "" ALL'
'SETATTR APPLICATION VAR_FINDSTRING "' || app.VAR_FINDSTRING || '"'
'SETATTR APPLICATION VAR_CHANGESTRING "' || app.VAR_CHANGESTRING || '"'
/*----- end of custom code area ----------------------------------------*/
'UNLOCKGUI'
EXIT
SYNTAX: /* ARexx error... */
say "Error line" SIGL ":" ERRORTEXT(RC) /* report it... */
'UNLOCKGUI' /* Unlock GUI! */
EXIT /* exit */
FAILURE:
'UNLOCKGUI' /* Unlock GUI! */
EXIT /* exit */